Multiple Adder
TIME LIMIT = 5 SECS.- List all the natural numbers below N that are multiples of x or y. Print the sum of these multiples . . .
Examples:
The multiples of 3 and 5 below 100 are 3,6,9,5,10,12,15 etc.
The sum of these multiples is 2318.
Input | Output |
The first line consists of x,y,n where the multiples of x and y are checked till n. |
The output consists of sum of the multiples of x and y |